home *** CD-ROM | disk | FTP | other *** search
- <title> New Title</title>
-
- <script language="EasyScript">
-
- registry = "New\\Title";
-
- center_flag = true;
- previous_text = "";
- current_text = "";
-
- /////////////////
- function OnLoad ()
- {
- object = new Title;
- object.setDefaultName ();
- }
- ///////////////////
- function OnChange ()
- {
- window.reparse();
- }
- ///////////////////////////////////
- function GetFontList (variable_name)
- {
- string = "<select name=\"" + variable_name + "\" onChange=\"OnFontChange()\" scrollable>";
- string += "<include vectorfonts>";
- string += "</select>";
- return string;
- }
- ///////////////////////
- function OnFontChange ()
- {
- window.reparse();
- }
- ///////////////////////
- function OnTextChange ()
- {
- current_text = object.text.substr (0,5);
- if (current_text != previous_text){
- previous_text = current_text;
- preview[0].generate (current_text);
- preview[0].centerPosition();}
- }
- /////////////////////////
- function GetPreviewText ()
- {
- preview = new Bitmap;
- preview.width = 160;
- preview.height = 80;
- preview.depth = 3;
- preview.background_color_on = true;
- title_copy = object.copy()
- title_copy.generate (current_text);
- preview.add (title_copy);
- title_copy.centerPosition();
- preview.create();
- return preview;
- }
- //////////////////////
- function CreateTitle ()
- {
- object.generate (object.text);
- window.returnValue (object);
- window.close ();
- }
- //////////////////////////
- function ChooseCharacter ()
- {
- c = showModalDialog ("choose_character.html", object.font_charset);
- if (c) object.text += toChar (c);
- OnTextChange ();
- }
- </script>
-
- <body bgcolor="normal" text="#000000" OnLoad="OnLoad()" OnEnter="CreateTitle()" translate>
- <div valign=middle>
-
- <table width="100%" cellspacing=4 cellpadding=0 bgcolor="light" borderstyle="raised">
- <tr><td valign=top><img src="images/large_text.bitmap"><spacer>
- <td><table>
- <tr><td>
- <font size=5>Title</font>
- <td><input type="text" size=16 name="object.name"><spacer>
- </table></table>
-
- <spacer height=4>
-
- <table width="100%" cellspacing=3 cellpadding=8 bgcolor="light" borderstyle="raised">
- <tr><td>
-
- <table cellpadding=0 cellspacing=0><tr>
- <td valign=top width=exact><u>Text</u>
- <td valign=top width=exact><input type="textarea" size=30,3 name="object.text" charset="object.font_charset" onChange="OnTextChange()" selected>
- </table>
-
- <tr><td><table cellpadding=0>
- <tr><td>
- <select name="object.letter_mode">
- <option value="single">Create as a single paint object
- <option value="separate">Create letters as separate paint objects
- </select>
- </table>
-
- </table>
-
- <spacer height=4><!--//////////// Font ////////////////////-->
-
- <table width="100%" cellspacing=0 cellpadding=8 bgcolor="light" borderstyle="raised">
- <tr><td>
- <table cellspacing=0 cellpadding=0><tr>
- <td><spacer width=8>
- <td><table cellspacing=0 cellpadding=0><tr>
- <td><u>Font</u>
- <td><include value="GetFontList('object.font_face')">
- <td><spacer width=8>
- <td><input type="text" name="object.font_height" size=4 onBlur="OnChange()">
- <img src="images/other_slider.bitmap" onclick="window.openSlider('object.font_height',8,200,1,'OnChange()','')">
- <td><spacer width=12>
- <td><table cellspacing=0 cellpadding=0>
- <tr><td><input type="checkbox" name="object.font_bold" onChange="OnChange()">Bold
- <tr><td><input type="checkbox" name="object.font_italic" onChange="OnChange()">Italic
- </table>
- <tr><td>Language<td>
- <select name="object.font_charset" onChange="window.reparse()">
- <option>normal
- <option>symbol
- <option>arabic
- <option>baltic
- <option>chinese
- <option>easteuropean
- <option>westeuropean
- <option>greek
- <option>hebrew
- <option>japanese
- <option>johab
- <option>korean
- <option>russian
- <option>turkish
- <option>thai
- <option>vietnamese
- </select>
- <a button width=+6 height=+2 onMouseUp="ChooseCharacter()">Map</a>
- </table>
- </table></table>
-
- <spacer height=4><!--/// Tools ///////////////////-->
-
- <table width="100%" cellspacing=0 cellpadding=0>
- <tr>
- <td width=exact valign=top>
- <table cellspacing=2 cellpadding=0 borderstyle="sunken">
- <tr><td><img object="GetPreviewText()">
- </table>
- <td><spacer>
- <td valign=top>
- <table cellspacing=0 cellpadding=0 bgcolor="light" borderstyle="raised" width=100%><tr><td height=80>
- <table cellspacing=8 cellpadding=3>
- <tr><td><input type="checkbox" name="object.brush.line" onChange="OnChange()">Line color<spacer width=16>
- <td><img button object='object.brush.line_color.getButton(30,20)' onMouseUp="showModalDialog('choose_color.html', new Array (object.brush, 'line_color', true)),OnChange()" title="Choose line color" reparse>
- <tr><td><input type="checkbox" name="object.brush.fill" onChange="OnChange()">Fill color<spacer width=24>
- <td><img button object='object.brush.fill_color.getButton(30,20)' onMouseUp="showModalDialog('choose_color.html', new Array (object.brush, 'fill_color', true)),OnChange()" title="Choose fill color" reparse>
- </table></table>
- </table>
-
- <spacer height=8>
-
- <table cellspacing=0 cellpadding=0 width="100%">
- <tr><td align=right>
- <a button onMouseUp="CreateTitle()" width=+10 height=+2><img src="images/small_text.bitmap" hspace=4>Create title</a>
- <a button onMouseUp="window.close()" width=+20 height=+2><img src="images/small_cancel.bitmap" hspace=4>Cancel</a>
- </table>
-
- <spacer height=4>
-